div.listingblock(id=node.$id(),class=node.$role())
  if node.$title() != false
    div.title !{node.$captioned_title()}
  div.content
    - nowrap = !(node.document.$attr("prewrap")) || node.$option('nowrap')
    if node.$style() == "source"
      - pre_class = ['highlight']
      - pre_lang = ""
      case node.$attr("source-highlighter")
        when "coderay"
          - pre_class = ['CodeRay']
        when 'pygments'
          - pre_class = ['pygments','highlight']
        when 'prettify'
          - pre_class = ['prettyprint']
          - pre_class.push(node.$attr("linenums"));
          - pre_class.push(node.$attr("language"));
          - pre_class.push("language-#{node.$attr('language')}");
        when 'html-pipeline'
          - pre_lang = node.$attr("language")
          - pre_class = code_class = nil
          - nowrap = false
      pre(class=pre_class,lang=pre_lang)
        code(class=[node.$attr("language"), "language-#{node.$attr('language')}"]) !{node.$content()}
    else
      pre(class=nowrap ? "nowrap" : "") !{node.$content()}